import request from "@/utils/request";

export function getList() {
  return request({
    url: "/admin/eduTeacher/findAll",
    method: "get"
  });
}

export function pageList(page, limit, searchObj) {
  return request({
    url: `/admin/eduTeacher/list/${page}/${limit}`,
    method: "get",
    params: searchObj
  });
}

export function removeById(id) {
  return request({
    url: `/admin/eduTeacher/remove/${id}`,
    method: "delete"
  });
}

export function batchRemoveByIds(ids) {
  return request({
    url: `/admin/eduTeacher/deleteByIds`,
    method: "delete",
    data: ids
  });
}

export function save(teacher) {
  return request({
    url: `/admin/eduTeacher/save`,
    method: "post",
    data: teacher
  });
}

export function getById(id) {
  return request({
    url: `/admin/eduTeacher/getById/${id}`,
    method: "get"
  });
}

export function updateById(teacher) {
  return request({
    url: `/admin/eduTeacher/update/`,
    method: "put",
    data: teacher
  });
}

export function selectNameListByKey(key) {
  return request({
    url: `/admin/eduTeacher/query/${key}`,
    method: "get"
  });
}
